package com.sir.tao.carhire.util;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author dyy
 * @data 2022/1/5 10:25
 * @description:
 */
public class ServletUtil {


    public static String renderString(HttpServletResponse response, String string)
    {
        try
        {
            response.setStatus(200);
            response.setContentType("application/json");
            response.setCharacterEncoding("utf-8");
            response.getWriter().print(string);
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        return null;
    }

}
